import { defineStore } from 'pinia';

export const useBackStore = defineStore('background', {
  state: () => ({ drawer: true, width: 260, captcha: '' }),

  actions: {
    switchMenu() {
      this.drawer = !this.drawer;
    },
    openMenu() {
      this.drawer = true;
    },
    closeMenu() {
      this.drawer = false;
    },
    setCaptcha(captcha: any) {
      this.captcha = captcha;
    },
  },
});
